package com.beilang.hotline.telattach.dao;

import com.beilang.base.core.dao.PaginationBaseDAO;
import com.beilang.hotline.telattach.model.TelattachModel;

import java.util.List;
import java.util.Map;
import java.util.HashMap;

public class TelattachDAO extends PaginationBaseDAO {

    public TelattachModel createTelattachModel(TelattachModel telattachModel) {
        return (TelattachModel) this.save(telattachModel);
    }

    public TelattachModel saveTelattachModel(TelattachModel telattachModel) {
        return (TelattachModel) this.save(telattachModel);
    }

    public void deleteTelattachModel(Long attachId) {
        this.remove(TelattachModel.class, attachId);
    }

    public TelattachModel getTelattachModel(Long attachId) {
        return (TelattachModel) this.get(TelattachModel.class, attachId);
    }

    protected String mapSortField(String dataField) {
        return "";
    }

    public List searchRecordAttachList(Long entityId,String entityType){
        Map map = new HashMap();
        map.put("entityId",entityId);
        map.put("entityType",entityType);
        return getSqlMapClientTemplate().queryForList("searchTelAttachList", map);
    }

}
